<include file="public:header" />
<!--机型管理-->
<div class="pad_lr_10">

  <form name="searchform" method="get" >
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
                    <input type="hidden" name="g" value="admin" />
                    <input type="hidden" name="m" value="model" />
                    <input type="hidden" name="a" value="index" />
                    <input type="hidden" name="menuid" value="{$menuid}" />

                    &nbsp;&nbsp;{:L('brand_name')} :
                    <select name="brandId">
                        <option value="0">{:L('please_select')}</option>
                        <volist name="brandList" id="name">
                            <option <if condition="$key eq $search['brandId']">selected=""</if> value="{$key}">{$name}</option>
                        </volist>
                    </select>
                    &nbsp;&nbsp;{:L('model_is_important')} :
                    <select name="isImportant">
                        <option value="">{:L('please_select')}</option>
                        <option <if condition="$search['isImportant'] eq 1">selected=""</if> value="1">{:L('yes')}</option>
                        <option <if condition="$search['isImportant'] eq '0'">selected=""</if> value="0">{:L('no')}</option>
                    </select>
                   
                     &nbsp;&nbsp;{:L('status')} :
                    <select name="status">
                        <option value="">{:L('please_select')}</option>
                        <option <if condition="$search['status'] eq 1">selected=""</if> value="1">{:L('model_status_1')}</option>
                        <option <if condition="$search['status'] eq '0'">selected=""</if> value="0">{:L('model_status_0')}</option>
                    </select>   
                    &nbsp;&nbsp;{:L('model_is_test')} :
                    <select name="isTest">
                        <option value="">{:L('please_select')}</option>
                        <option <if condition="$search['isTest'] eq 1">selected=""</if> value="1">{:L('yes')}</option>
                        <option <if condition="$search['isTest'] eq '0'">selected=""</if> value="0">{:L('no')}</option>
                    </select>                                         
					&nbsp;&nbsp;{:L('model_name')} :                    
					<input type="text" name="name" class="input-text" size="22" value="{$search.name}" />                    
                    <input type="submit" name="search" class="btn" value="{:L('search')}" />
					
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>


    <div class="J_tablelist table_list" data-acturi="{:U('model/ajax_edit')}">
        <table width="100%" cellspacing="0">
            <thead>
            <tr>
                <th width="40"><input type="checkbox" name="checkall" class="J_checkall"></th>
                <th width="40">ID</th>
                <th>{:L('model_name')}</th>                 
                <th>{:L('brand_name')}</th>
                <th>{:L('model_is_important')}</th> 
               
                <!--th>{:L('model_is_test')}</th-->  
                <th>{:L('model_is_sales')}</th>             
                <th width=100>{:L('operations_manage')}</th>
            </tr>
            </thead>
    	    <tbody>
            <volist name="list" id="val" >
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center" width="20">{$val.id}</td>
                <td align="center"><span data-tdtype="edit" data-field="name" class="tdedit" data-id="{$val.id}">{$val.name}</span></td>
                
                <td align="center">{$brandList[$val['brandId']]}</td>
                <td align="center">
                    <img data-tdtype="toggle" data-field="isImportant" data-id="{$val.id}" data-value="{$val.isImportant}" src="__STATIC__/images/admin/toggle_<if condition="$val.isImportant eq 0">disabled<else/>enabled</if>.gif" />
                </td>
                
                <!--td align="center">
                    <img data-tdtype="toggle" data-field="isTest" data-id="{$val.id}" data-value="{$val.isTest}" src="__STATIC__/images/admin/toggle_<if condition="$val.isTest eq 0">disabled<else/>enabled</if>.gif" />                
                </td-->                
                
                <td align="center">
                    <img data-tdtype="toggle" data-field="status" data-id="{$val.id}" data-value="{$val.status}" src="__STATIC__/images/admin/toggle_<if condition="$val.status eq 0">disabled<else/>enabled</if>.gif" />
                </td>
                <td align="center">
                    <a href="javascript:;" class="J_showdialog" data-uri="{:U('model/edit', array('id'=>$val['id']))}" data-title="{:L('edit')} - {$val.name}"  data-id="edit" data-width="450" data-height="300">{:L('edit')}</a> | 
                    <a href="javascript:;" class="J_confirmurl" data-acttype="ajax" data-uri="{:U('model/delete', array('id'=>$val['id']))}" data-msg="{:sprintf(L('confirm_delete_one'),$val['name'])}">{:L('delete')}</a>
                </td>
            </tr>
            </volist>
    	   </tbody>
        </table>
    </div>
    <div class="btn_wrap_fixed">
		<label class="select_all mr10"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
    	<input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('model/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
		<div id="pages">{$page}</div>
    </div>
</div>
<include file="public:footer" />
</body>
</html>